package com.whfc.common.enums;

/**
 * @author sun_guodong
 * @description 升降机状态的硬件数据
 * @date 2020-05-29
 */
public enum LiftDeviceStatus {

    LIFT_WEIGH_OVERLOAD(1, 201, "特种设备升降机重量报警"),
    LIFT_FALL(2, 202, "特种设备升降机防坠器报警"),
    LIFT_SPEED(3, 203, "特种设备升降机运行速度报警"),
    LIFT_FRONT_GATE(4, 204, "特种设备升降机前门未关报警"),
    LIFT_HEIGHT_RUSH_TOP(5, 205, "特种设备升降机高度冲顶报警"),
    LIFT_PEOPLE_OVERSTEP(6, 206, "特种设备升降机人数超出报警"),
    LIFT_DIP_ANGLE(7, 207, "特种设备升降机倾斜报警"),
    LIFT_WINDSPEED(8, 208, "特种设备升降机风速报警"),
    LIFT_UP(9, 209, "特种设备升降机上限位报警"),
    LIFT_BACK_GATE(10, 210, "特种设备升降机后门未关报警"),
    ;

    private Integer value;
    private Integer ruleType;
    private String desc;

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getRuleType() {
        return ruleType;
    }


    LiftDeviceStatus(Integer value, Integer ruleType, String desc) {
        this.value = value;
        this.ruleType = ruleType;
        this.desc = desc;
    }

    public static LiftDeviceStatus parseByValue(Integer value) {
        switch (value) {
            case 1:
                return LIFT_WEIGH_OVERLOAD;
            case 2:
                return LIFT_FALL;
            case 3:
                return LIFT_SPEED;
            case 4:
                return LIFT_FRONT_GATE;
            case 5:
                return LIFT_HEIGHT_RUSH_TOP;
            case 6:
                return LIFT_PEOPLE_OVERSTEP;
            case 7:
                return LIFT_DIP_ANGLE;
            case 8:
                return LIFT_WINDSPEED;
            case 9:
                return LIFT_UP;
            case 10:
                return LIFT_BACK_GATE;
            default:
                return null;
        }
    }

    public static void main(String[] args) {
        System.out.println(0x000000009);
    }
}
